package com.fq.binderconnectpool;

import android.os.RemoteException;

/**
 * @author:范启 Created on 2020/7/6.
 * Description:
 */

public class SecurityImpl extends ISecurityCenter.Stub{
    private static final char SECRET_CODE = 'w';

    @Override public String encrypt(String content) throws RemoteException {
        char[] chars = content.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            chars[i] ^= SECRET_CODE;
        }
        return new String(chars);
    }

    @Override public String decrypt(String password) throws RemoteException {
        return encrypt(password);
    }
}
